package edu.fzu.shop.service.Impl;

import java.util.List;

import edu.fzu.shop.bean.CustomerBean;
import edu.fzu.shop.dao.CustomerDao;
import edu.fzu.shop.dao.Impl.CustomerDaoJDBCImpl;
import edu.fzu.shop.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	public CustomerBean getCustomerBeanById(String custId) {
		CustomerDao customerDao = new CustomerDaoJDBCImpl();
		
		return customerDao.getCustomerBeanById(custId);
	}

	public List<CustomerBean> loadAll() {
		CustomerDao customerDao = new CustomerDaoJDBCImpl();
		return customerDao.loadAll();
	}

	public void remove(String custId) {
		CustomerDao customerDao = new CustomerDaoJDBCImpl();
		customerDao.delete(custId);
	}

	public void save(CustomerBean customerBean) {
		CustomerDao customerDao = new CustomerDaoJDBCImpl();
		customerDao.add(customerBean);
		
	}

	public void update(CustomerBean customerBean) {
		CustomerDao customerDao = new CustomerDaoJDBCImpl();
		customerDao.update(customerBean);
	}




}
